import request from '@/config/axios'

// 获得机会列表
export const getchancelist = async (params) => {
  return await request.get({ url: '/sys/prizeChance/page',params })
}
// 新增机会列表
export const addchance = async (data) => {
  return await request.post({ url: '/sys/prizeChance/save',data })
}
//根据id获得机会详情
export const getchancebyid = async (params) => {
  return await request.get({ url: '/sys/prizeChance/getPrizeChanceById',params })
}
//根据用户获得机会详情
export const getchancebyuse = async (params) => {
  return await request.get({ url: '/sys/prizeChance/getPrizeChanceByUserId',params })
}
// 删除机会
export const deletechance = async (params) => {
  return await request.delete({ url: 'sys/prizeChance/delete',params})
}

// 选择活动   pageNo=1&pageSize=10&tabType=0&name=
export const selelctactivity = async (params) => {
  return await request.get({ url: '/sys/prize/page',params})
}

// 机会详情
export const queryDetail=async(params)=>{
  return await request.get({url:'/sys/prizeChance/selectChanceDetailByParam',params})
}
// 机会赠送
export const sendChance=async(params)=>{
  return await request.get({url:'/sys/prizeChance/sendUserChance',params})
}
// 选择赛选   pageNo=1&pageSize=10&tabType=0&name=
export const queryDetailbytype = async (params) => {
  return await request.get({ url: '/sys/activityRule/list',params})
}
// 选择用户   pageNo=1&pageSize=10&tabType=0&name=
export const queryUser = async (params) => {
  return await request.get({ url: '/member/user/page',params})
}